package com.iyeed.jbpm03.demo10.mailnode;

import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.graph.exe.Token;
import org.junit.Test;

import com.iyeed.util.PackageUtils;

public class MailNodeTest {

	@Test
	public void testSendMail() {
		ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource(PackageUtils.getPackageNameForRelativePath(this.getClass()) + "/jpdl/mailnodeprocess/processdefinition.xml");  
        ProcessInstance processInstance = new ProcessInstance(processDefinition);  
        processInstance.getContextInstance().setVariable("actorId", "iyeed");  
        Token token = processInstance.getRootToken();  
        token.signal();  
        System.out.println("end^^^^^^^^^^^^");  
	}
}
